package com.jhws.core.spring;

import org.springframework.beans.factory.FactoryBean;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;

public class GsonFactory implements FactoryBean<Gson>{

	@Override
	public Gson getObject() throws Exception {
		return new GsonBuilder().setDateFormat("yyyy-MM-dd HH:mm:ss:SSS").create();
	}

	@Override
	public Class<?> getObjectType() {
		return Gson.class;
	}

	@Override
	public boolean isSingleton() {
		return true;
	}

}
